import * as VueRouter from 'vue-router'
import datas from '../mock/datas'

let routes = datas.map(item => {
  return {path: `/${item.keyword}`, component: () => import(`@routepage/${item.component}.vue`)}
})

const router = VueRouter.createRouter({
  history: VueRouter.createWebHashHistory(),
  routes,
})

export default router